package com.demo.mqtt.vo;

import com.demo.mqtt.utils.HttpCode;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Created by zgscwjm on 2017/5/8.
 */
public class APIVO<T> {
    private int code;
    private String msg;
    @JsonProperty("data")
    private T data;


    public APIVO() {
    }

    public APIVO(int code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public APIVO(T data) {
        this.data = data;
        this.code = HttpCode.SUCCESS;
        this.msg = "成功";
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


}
